package com.ppm.server.user.mapper;

import com.ppm.common.base.entity.UserInfo;
import com.ppm.server.user.dto.UserInfoDTO;
import com.ppm.server.user.dto.UserQueryConditionDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @author KwokChiKit
 * @date 2021/4/29 10:40
 * @Description 用户信息表操作类
 */
@Repository
public interface UserInfoMapper extends Mapper<UserInfo> {

    /**
     * 根据用户id查找用户信息
     * @param userId 用户id
     */
    @Select("select name from user_info where #{userId}")
    UserInfo selectNameByUserId(@Param("userId") Long userId);

    List<UserInfoDTO> getUserList(@Param("dto") UserQueryConditionDTO userQueryConditionDTO);

}